From: Jasper St. Pierre Date: Mon, 28 May 2012 23:26:02 +0000 (-0400) Subject: browser-plugin: Fix enable/disable X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~6536 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=ad6d9861726dc64480f971da44a1701e3554c01d;p=gnome-shell.git browser-plugin: Fix enable/disable This code was broken at the last minute, and an accidentally stale plugin copy kept it untested. https://bugzilla.gnome.org/show_bug.cgi?id=676837 --- diff --git a/browser-plugin/browser-plugin.c b/browser-plugin/browser-plugin.c index 2676beb22..01f335a04 100644 --- a/browser-plugin/browser-plugin.c +++ b/browser-plugin/browser-plugin.c @@ -515,9 +515,9 @@ plugin_enable_extension (PluginObject *obj, if (enabled) { new_uuids = g_new (const gchar *, length + 2); /* New key, NULL */ - memcpy (new_uuids, uuids, length); - new_uuids[length - 2] = uuid_str; - new_uuids[length - 1] = NULL; + memcpy (new_uuids, uuids, length * sizeof (*new_uuids)); + new_uuids[length] = uuid_str; + new_uuids[length + 1] = NULL; } else {